// 评论请求模块

import request from "../utils/request";
// 获取评论列表

export const getComment = params => {
    return request({
        method: 'GET',
        url: '/app/v1_0/comments',
        params
    })
}

// 评论点赞
export const likingComment = target => {
    return request({
        method: 'POST',
        url: '/app/v1_0/comment/likings',
        data: {
            target
        }
    })
}

// 取消评论点赞
export const deletelikingComment = target => {
    return request({
        method: 'DELETE',
        url: `/app/v1_0/comment/likings/${target}`
    })
}


// 添加评论
export const addComments = params => {
    return request({
        method: 'POST',
        url: '/app/v1_0/comments',
        params
    })
}